<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../jquery.min.js"></script>
    <style>
        div{
            width: 200px;
            height: 200px;
            background-color: pink;
        }
    </style>
</head>
<body>
<script>
    // $('div').hide();
    //1.等着页面DOM加载完毕再去执行js代码
    // $(document).ready(function () {
    //     $('div').hide();
    // });

    //2.等着页面DOM加载完毕再去执行js代码
    $(function () {
        $('div').hide();
    })
</script>
<div></div>

</body>
</html>
